﻿
using System;
using System.Collections.Generic;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

/// <summary>
///CategoryService 的摘要说明
/// </summary>
public class CategoryService
{
    private static CategoryService _instance = new CategoryService();
    private ICategoryDao _categoryDao = null;

    private CategoryService()
	{
        _categoryDao = new CategoryDao();
	}

    public static CategoryService GetInstance()
    {
        return _instance;
    }

    public IList<Category> GetCategoryList()
    {
        return _categoryDao.GetCategoryList();
    }

    public Category GetCategoryByName(string categoryName)
    {
        return _categoryDao.GetCategoryByName(categoryName);
    }


    public void UpdateCategoryDescription(Category category)
    {
        _categoryDao.UpdateCategoryDescription(category);
    }
}
